﻿using StudentManagement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace StudentManagement.Infrastructure.Repositories
{
    public interface IRepository<T> where T : BaseEntity
    {
        IQueryable<T> GetAll();
        IEnumerable<T> GetAllAsList();
        T Get(int id);
        T Single(Expression<Func<T, bool>> predicate);
        T Insert(T entity);
        T Update(T entity);
        void Delete(T entity);
        int Count();
    }
}
